package com.evan.webadmin.biz.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.evan.webadmin.biz.model.Exam;
import com.evan.webadmin.biz.vo.ExamRankVo;
import com.evan.webadmin.biz.vo.ExamVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Pavel
 * @since 2024-06-10
 */
public interface ExamMapper extends BaseMapper<Exam> {

    @Select("SELECT * FROM biz_exam WHERE exam_id = #{examId}")
    Exam selectByExamId(Long examId);

    List<ExamRankVo> rank10(@Param("moduleType") Integer moduleType, @Param("paperId") Long paperId,@Param("personnelType") Integer personnelType);

    ExamRankVo rankSelf(@Param("moduleType") Integer moduleType, @Param("paperId") Long paperId,@Param("personnelType") Integer personnelType, @Param("userId") String userId);

    List<ExamRankVo> rankList(@Param("moduleType") Integer moduleType, @Param("paperId") Long paperId,@Param("personnelType") Integer personnelType);

    List<ExamVo> listByCondition(@Param("examType") Integer examType, @Param("userName") String userName);
}
